package com.zzty.txj.serviceImpl;

import com.zzty.txj.dao.SearchMapper;
import com.zzty.txj.entity.Clazz;
import com.zzty.txj.entity.Daily;
import com.zzty.txj.entity.DoDaily;
import com.zzty.txj.entity.User;
import com.zzty.txj.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class SearchServiceImpl implements SearchService {
    @Autowired
    SearchMapper searchMapper;
    public List<Clazz> getClazz(){
        List<Clazz>clazzes=searchMapper.getClazz();
        return clazzes;
    }

    public List<User> getUser(int id){
        List<User>users=searchMapper.getUser(id);
        return users;
    }

    public List<DoDaily>getDoDaily(String date){
        List<DoDaily> doDailies=searchMapper.getDoDaily(date);
        return doDailies;
    }

    public Integer count(DoDaily doDaily){
        Integer count=searchMapper.count(doDaily);
        return count;
    }

    public List<DoDaily>counts(DoDaily doDaily){
        List<DoDaily >counts=searchMapper.counts(doDaily);
        return counts;
    }

    public Integer getMoney(Integer id){
        Integer money=searchMapper.money(id);
        return money;
    }

    public Integer result(DoDaily doDaily){

        Integer result=searchMapper.result(doDaily);

        return result;
    }
    public Integer count1(DoDaily doDaily){
        Integer result=searchMapper.count1(doDaily);
        return result;
    }

    public List<Integer> getUserId(DoDaily doDaily){
        List<Integer>getUserId=searchMapper.getUserId(doDaily);
        return getUserId;
    }
}
